﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="ArticlesHomePage.ascx.cs" Inherits="webapp4U.UI.Controls.Product" %>
<%@ Import Namespace="webapp4U" %>
<%@ Register TagPrefix="webapp4U" Namespace="webapp4U.UI" %>

<table align="center" width="97%">
<asp:Repeater runat="server" ID="rptCategory">
<ItemTemplate>
    <tr>
        <td align="left" style="font-weight:bold; padding-top:5pt; padding-left:1px;" class="Title">
            <table>
                <tr>
                    <td><img src="<%=Globals.ImagesUrl()%>/l.gif" border="0"></td>
                    <td><%# (Globals.LangVietNam())? Eval("CateName") : Eval("CateName_en")%> </td>
                </tr>
            </table>
        </td>
    </tr>
    <tr>
        <td>
            <table align="center" width="98%" border="0">
                <asp:Repeater runat="server" ID="rptArticles" DataSource='<%# GetItemsByCateID((int) Eval("CateID")) %>'>
                    <ItemTemplate>
                        <tr>
                            <td align="left">
                                <div style="padding-bottom: 3pt;">
                                    <a class="NewsTitle" href="<%=Globals.ApplicationPath%>Articles/ArticleDetail.aspx?ArticleID=<%# Eval("ArticleID")%>">
                                        <b><%# Eval("Title") %></b>
                                    </a>
                                    <span class="NewsTime">(<%# Formatter.FormatDate((DateTime)Eval("PostDate")) %>)</span>
                                </div>
                                <table cellspacing="5" cellpadding="0" align="left" border="0">
                                    <tbody>
                                        <tr>
                                            <td class="BorderImage">
                                                <webapp4U:ImageObject Width="130" ImageFilter='off' BorderStyle="solid" ID="img1" runat="server"
                                                ImagePath='<%# Globals.ApplicationPath  + "UserUpload/Articles/" %>'
                                                ImageName='<%# Eval("ImageURL") %>'/></td>
                                        </tr>
                                    </tbody>
                                </table>
                                <div style="text-align: justify; line-height:18px">
                                    <%#Eval("Excerpt") %>
                                </div>
                            </td>
                        </tr>
                        <tr>
                            <td align="right" style="padding-right: 3pt; padding-bottom:5px;">
                                <img src="<%=Globals.ImagesUrl()%>arrow.gif" />
                                <a class="ReadMore" href="<%=Globals.ApplicationPath%>Articles/ArticleDetail.aspx?ArticleID=<%# Eval("ArticleID")%>"><%=ResourceManager.GetString("ReadMore") %></a>
                            </td>
                        </tr>
                    </ItemTemplate>
                </asp:Repeater>
            </table>
        </td>
    </tr>
    <tr><td style="background-repeat:repeat-x; padding:3pt;" background="<%=Globals.ImagesUrl()%>pm_line.gif"></td></tr>
</ItemTemplate>
</asp:Repeater>


</table>